import time,app
import unittest

from HTMLTestRunner_Chart import HTMLTestRunner
# 加载测试套件

suite = unittest.TestSuite()
# suite.addTest(unittest.makeSuite("类名"))
# suite.addTest("类名"("方法"))
suite = unittest.TestLoader().discover("script", "test_*.py")
# 生成测试报告
# runner = unittest.TextTestRunner()
report_name = app.BASE_DIR + f"/report/ihrm{time.strftime('%Y%m%d%H%M%S')}.html"
with open(report_name,"wb") as f:
    runner = HTMLTestRunner(f, verbosity=2, description="测试登录模块")
    runner.run(suite)
# 测试轮巡
print("测试轮询")
